package com.louis.affair.controller;

import com.louis.affair.service.BookService;
import com.louis.affair.service.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author XRY
 * @date 2023年06月28日9:52
 */

@Controller
public class BookController {
/*    @Autowired
    private BookService bookService;

    //买书的方法:图书id和用户id
    public void buyBook(Integer bookId, Integer userId){
        //调用service方法
        bookService.buyBook(bookId, userId);
    }*/

    @Autowired
    private CheckoutService checkoutService;
    public void checkout(Integer[] bookIds, Integer userId){
        checkoutService.checkout(bookIds, userId);
    }
}
